package com.example.test.config;

import com.example.test.service.DemoService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @author ljw
 * @description
 * @date 2021/8/14 18:12
 */
@Configuration
public class DemoConfig {

    @Bean
    @Profile("dev")
    public DemoService devDemoService() {
        return new DemoService("development profile");
    }

    @Bean
    @Profile("prod")
    public DemoService prodDemoService() {
        return new DemoService("production profile");
    }
}
